#coding:utf-8

import sys
import jieba
import jieba.analyse
from config import config
home_dir =  config.get_home_dir()
from train_data import genera_data


#训练数据生成
def train_test_genera_data():
    path = home_dir + 'result/train_result_tag.txt'
    trainpath = home_dir + 'train/tag_train.data'
    testpath = home_dir + 'train/tag_test.data'
    orgin_path = home_dir + 'train.txt'
    genera_data.pos_tag_word(orgin_path, path)
    genera_data.convertTag(path, trainpath, testpath, size=5,isTest=True)

if __name__ == "__main__":
    train_test_genera_data()